<%@page import="entities.Domain"%>
<%@page import="java.util.List"%>
<%@page import="entities.SiteConfig"%>
<%@page import="helpers.UrlHelper"%>
<%@page import="java.util.ArrayList"%>
<%@ page contentType="text/xml;charset=UTF-8" language="java"%>
<%
	SiteConfig configs = (SiteConfig) request.getAttribute("config");
	List<Domain> domains = (List<Domain>) request.getAttribute("domains");
	String serverUrl = UrlHelper.getServerUrl(request);
%>
<?xml version="1.0" encoding="UTF-8"?>
  <rss version="2.0"
    xmlns:dc="http://purl.org/dc/elements/1.1/"
    xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
    xmlns:admin="http://webns.net/mvcb/"
    xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
    xmlns:content="http://purl.org/rss/1.0/modules/content/">
    <channel>
    <title><![CDATA[ <%=configs.getTitle() %>]]></title>
    <link><%=serverUrl %></link>
    <description><![CDATA[<%=configs.getMetaDescription() %>]]></description>
    <dc:language>en-ca</dc:language>
    <dc:creator>Google App Engine</dc:creator>
    <dc:rights>Copyright 2012</dc:rights>
    <admin:generatorAgent rdf:resource="<%=serverUrl %>/" />
    	<%
    	for(Domain domain : domains) 
		{
   		%>
	       <item>
	          <title><![CDATA[ <%=domain.getDomain()%> ]]></title>
	          <link><%=serverUrl %>/www/<%=domain.getDomain()%></link>
	          <guid><%=serverUrl %>/www/<%=domain.getDomain()%></guid>
	          <description><![CDATA[ 
	          View safety info about <%=domain.getDomain()%> in Check Safe Site. Check Safe Site is a website which lookup reputation and safety infomation. Check Safe Site will check if links are safe or not through Google Safe Browsing, Web of Trust, McAfee SiteAdvisor, Norton safeweb and some other free online malware scanners.
	          ]]></description>
	      	  <pubDate>
	      	  	<%=domain.getUpdated()%>
	      	  </pubDate>
	       </item>
      	<%
   		}
       	%>
    </channel>
</rss>  